package com.atguigu.yygh.hosp.utlis;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @description:===========自定义=工具类
 * @author :又菜又爱玩的→速趴塞亚锦←
 * @create :2023/5/16
 * @param  :1.8
 */
public class HttpRequestHelper {
     //做了转换
    public static Map<String, Object> switchMap(Map<String, String[]> parameterMap) {
        //转换完的放到了resultMap这里面，然后返回
        Map<String, Object> resultMap = new HashMap<String, Object>();

        Set<Map.Entry<String, String[]>> entries = parameterMap.entrySet();

        for (Map.Entry<String, String[]> entry : entries) {//变量
            String key = entry.getKey();
            String value = entry.getValue()[0];
            resultMap.put(key,value);
        }

        return resultMap;
    }
}
